//
//  UILabel+Extension.swift
//  Weibo - Swift
//
//  Created by user on 16/4/16.
//  Copyright © 2016年 user. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(textColor:UIColor,fontSize:CGFloat, preferredMaxLayoutWidth:CGFloat = 0){

        self.init()
        
        self.textColor = textColor
        
        self.font = UIFont.systemFontOfSize(fontSize)
        
        if preferredMaxLayoutWidth > 0{
            
            self.preferredMaxLayoutWidth = preferredMaxLayoutWidth
            
            self.numberOfLines = 0
        }
        
    }
}
